home *** CD-ROM | disk | FTP | other *** search
INI File | 2001-09-10 | 907 b | 29 lines |
- [Name]
- KnobBounds -- Use with KnobBehavior to add bounds to angle.
- By Matthew Peterson, matthew@pinoko.berkeley.edu
-
- [Description]
- 2-19-2000
- This behavior is used with the KnobBehavior and has no function on its own.
- Use it to add upper and lower bounds to the setable value of the knob.
- Just add this behavior to a sprite that has the KnobBehavior, and set the
- upper bounds and the lower bounds parameters.
-
- Revision History:
- Written on 2-19-2000.
-
- [Parameters]
-
- Lower Bounds(-180 to 180), MP_KnobLowerBound,-90,-180,180
- Upper Bounds(-180 to 180), MP_KnobUpperBound,90,-180,180
-
- [200023 MP_KnobBoundsFilter]
- SpriteVars KnobAngle
- //Filter the angle of the knob so that it stays within the upper and lower bounds.
- //If over or under, then set it to the boundary.
- IF(knobAngle < $MP_KnobLowerBound)
- knobAngle = $MP_KnobLowerBound
- ELSEIF(knobAngle > $MP_KnobUpperBound)
- knobAngle = $MP_KnobUpperBound
- ENDIF
-